<?php
            


/**
 * Desc:
 * Time: 2021/5/27 1:35 下午
 */


//新抽奖
//活动规则
$yx_lt_rules = [];
$lingzeoptions = $_P['lingzeoptions'];
$lingzeimg = $_P['lingzeimg'];
$lz_package_name = $_P['lz_package_name'];
$lz_package_title = $_P['lz_package_title'];
$optionsimg = $_P['optionsimg'];
$lz_get_phone = $_P['lz_get_phone'];//好友参加收集手机号

$new_lingzeoptions = [];
if (is_array($lingzeoptions)){
    foreach ($lingzeoptions as $k =>$v){
        if ($v){
            $new_lingzeoptions[$k] = $v;
        }
    }
}
$new_lingzeimg = [];
if (is_array($lingzeimg)){
    foreach ($lingzeimg as $key => $val){
        if ($val){
            $new_lingzeimg[$key] = tomedia($val);
        }
    }
}
$new_optionsimg = [];
if (is_array($optionsimg)){
    foreach ($optionsimg as $kk => $vv){
        if ($vv){
            $new_optionsimg[$kk] = tomedia($vv);
        }
    }
}
$new_addressoptions = [];
$addressoptions = $_P['addressoptions'];
foreach ($addressoptions as $kkk => $vvv){
    if ($vvv){
        $new_addressoptions[$kkk] = $vvv;
    }
}

$tempconfig = array(
    'lingzeimg' => $new_lingzeimg,//礼包奖品图片
    'lingzeoptions' => $new_lingzeoptions,//礼包奖品
    'addressoptions' => $new_addressoptions,//礼包奖品
    'lz_package_name' => $lz_package_name,//礼包名称
    'lz_package_title' => $lz_package_title,//礼包名称
    'lz_big_gift' => intval($_P['lz_big_gift']),//大礼包礼品选项  0 关闭  1开启
    'optionsimg' => $new_optionsimg,//大礼包图片数组
    'lz_get_phone' => $lz_get_phone
);
$config = array_merge($config, $tempconfig);


